﻿using Bricks.Component.Utils;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;

namespace Bricks.Business.Models.ExpenseManagement
{
    [Description("标段费用付款")]
    public class Expense : EntityBase<Guid>
    {
        public Expense()
        {
            ID = GuidHelper.NewGuid();
        }

        [Required]
        [StringLength(255)]
        [Description("流程编码")]
        public string FlowCode { get; set; }

        [Display(Name = "项目ID")]
        public Guid ProjectID { get; set; }

        [Display(Name = "标段ID")]
        public Guid ContractID { get; set; }

        [Display(Name = "合同来源")]
        public string ContractSource { get; set; }

        public int ExpenseNum { get; set; }
        
        //记录申请人的本次申请金额，用在主界面显示数据
        public decimal? RequestMoneyForRequestPerson { get; set; }

        public string RequestPerson { get; set; }

        //流程里每个节点的审批金额，流程流转到下一节点保存的时候就更新；申请节点的时候是申请金额
        public decimal? ApprovalMoney { get; set; }

        /// <summary>
        /// 期次--Add By Luozx
        /// </summary>
        public int? ContractStages { get; set; }

        public DateTime RequestDate { get; set; }

        public string RequeatReason { get; set; }

        public string Attachment { get; set; }

        public string PayNum { get; set; }

        //流转状态：
        //0：申请；1：流转；2：结束；3：终止；4：回退
        [Required]
        [StringLength(1)]
        public string HandleState { get; set; }

        public string LastUpdateUserDepartment { get; set; }

        public string LastUpdateUser { get; set; }

        public DateTime? LastUpdateTime { get; set; }
    }
}
